package org.x.user.dto;

import lombok.Data;
import jakarta.validation.constraints.NotBlank;
import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 部门入参对象
 *
 * @author 夏包包
 * @date 2025-03-08 13:39:03
 */
@Data
public class DeptDTO {

    /**
     * 部门id:必填
     */
    @NotBlank(groups = { DeleteGroup.class, UpdateGroup.class }, message = "部门id不能为空")
    @Schema(description = "部门id:必填")
    private String deptId;

    /**
     * 部门名称:必填
     */
    @NotBlank(groups = { CreateGroup.class, UpdateGroup.class }, message = "部门名称不能为空")
    @Schema(description = "部门名称:必填")
    private String deptName;

    /**
     * 父部门ID
     */
    @Schema(description = "父部门ID")
    private String parentId;

    /**
     * 部门描述
     */
    @Schema(description = "部门描述")
    private String deptDesc;

    /**
     * 所属租户
     */
    @Schema(description = "所属租户")
    private String tenantId;

    /**
     * 部门编码:必填且租户内唯一
     */
    @NotBlank(groups = { CreateGroup.class }, message = "部门编码不能为空")
    @Schema(description = "部门编码:必填且租户内唯一")
    private String deptCode;

    /**
     * 数据权限规则
     */
    @Schema(description = "数据权限规则")
    private String dataScopeRule;

    /**
     * 排序序号
     */
    @Schema(description = "排序序号")
    private Integer sort;
}
